<!DOCTYPE html>
<html class="x-admin-sm">

<head>
    {include file="common/head" /}
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row">
        <form action="{$_self_}" class="layui-form layui-form-pane ajax_post">
            <div class="layui-form-item">
                <label for="role_name" class="layui-form-label">
                    <span class="x-red">*</span>设备号
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="role_name" name="device_number" required="" lay-verify="required"
                           autocomplete="off" class="layui-input" value="{$info['device_number']|default=''}">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="address" class="layui-form-label">
                    <span class="x-red">*</span>设备地址
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="address" name="address" required="" lay-verify="required"
                           autocomplete="off" class="layui-input" value="{$info['address']|default=''}">
                </div>
            </div>
            <div class="layui-form-item">
                <button class="layui-btn" lay-submit="" lay-filter="add">提交</button>
            </div>
        </form>
    </div>
</div>
<script src="__STATIC__/js/jquery-2.1.4.min.js"></script>
<script src="__STATIC__/js/common.js"></script>
<script>
    layui.use(['form','layer'], function(){
        $ = layui.jquery;
        var form = layui.form
            ,layer = layui.layer;

        //自定义验证规则
        // form.verify({
        //     rolename: function(value){
        //         if(value.length < 3){
        //             return '角色名至少得3个字符';
        //         }
        //     },
        // });



        //监听提交(检测是否勾选复选框)
        // form.on('submit(add)', function(data){
        //     console.log(data.form);
        //     console.log(data);
        //     return false;
        // });




    });
</script>
</body>

</html>